package com.google.code.shardbatis.converter;

import com.google.code.shardbatis.util.MapperUtils;

public class SqlConverterOrderBy implements java.io.Serializable {

	private static final long serialVersionUID = -1786820983948976082L;
	
	private String columnName = null;
	private boolean asc = false;
	private String fieldName = null;
	
	public SqlConverterOrderBy(String columnName, boolean asc) {
		this(columnName, asc, columnName);
	}
	public SqlConverterOrderBy(String columnName, boolean asc, String fieldName) {
		this.setColumnName(MapperUtils.convertName(columnName));
		this.setAsc(asc);
		this.setFieldName(MapperUtils.convertName(fieldName));
	}
	
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	
	public boolean isAsc() {
		return asc;
	}
	public void setAsc(boolean asc) {
		this.asc = asc;
	}
	
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

}
